#ifndef _MESH_MESHTRIANGLE_H_
#define _MESH_MESHTRIANGLE_H_

#include "../Geometry/Shape.h"

class Mesh;
class Texture;

class MeshTriangleUV : public Shape
{
public:
	MeshTriangleUV();
	MeshTriangleUV(Mesh* _Mesh, int p0, int p1, int p2, int index);
	~MeshTriangleUV();
	bool hit(const Ray& r, float tmin, float tmax, float time, HitRecord &record) const;
	bool shadowHit(const Ray& r, float tmin, float tmax, float time) const;
private:
	//	p[3] stores the index of the vertex in Mesh pointed by mesh_ptr
	int p[3];
	//	mesh_ptr contains the vertex, normals, textures, etc.
	Mesh* mesh_ptr;
};


#endif